package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.FintechRiskRule;
import com.appkubes.mall.core.po.FintechRiskRuleExample;
import com.appkubes.mall.core.po.FintechRiskRuleKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface FintechRiskRuleMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechRiskRuleSqlProvider.class, method="countByExample")
    long countByExample(FintechRiskRuleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @DeleteProvider(type=FintechRiskRuleSqlProvider.class, method="deleteByExample")
    int deleteByExample(FintechRiskRuleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @Delete({
        "delete from fintech_risk_rule",
        "where risk_type = #{riskType,jdbcType=VARCHAR}",
          "and rule_code = #{ruleCode,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(FintechRiskRuleKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @Insert({
        "insert into fintech_risk_rule (risk_type, rule_code, ",
        "rule_name, rule_value, ",
        "rule_description, create_time, ",
        "updatete_time)",
        "values (#{riskType,jdbcType=VARCHAR}, #{ruleCode,jdbcType=VARCHAR}, ",
        "#{ruleName,jdbcType=VARCHAR}, #{ruleValue,jdbcType=VARCHAR}, ",
        "#{ruleDescription,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateteTime,jdbcType=TIMESTAMP})"
    })
    int insert(FintechRiskRule record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @InsertProvider(type=FintechRiskRuleSqlProvider.class, method="insertSelective")
    int insertSelective(FintechRiskRule record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechRiskRuleSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="risk_type", property="riskType", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="rule_code", property="ruleCode", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="rule_name", property="ruleName", jdbcType=JdbcType.VARCHAR),
        @Result(column="rule_value", property="ruleValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="rule_description", property="ruleDescription", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updatete_time", property="updateteTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<FintechRiskRule> selectByExampleWithRowbounds(FintechRiskRuleExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechRiskRuleSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="risk_type", property="riskType", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="rule_code", property="ruleCode", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="rule_name", property="ruleName", jdbcType=JdbcType.VARCHAR),
        @Result(column="rule_value", property="ruleValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="rule_description", property="ruleDescription", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updatete_time", property="updateteTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<FintechRiskRule> selectByExample(FintechRiskRuleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "risk_type, rule_code, rule_name, rule_value, rule_description, create_time, ",
        "updatete_time",
        "from fintech_risk_rule",
        "where risk_type = #{riskType,jdbcType=VARCHAR}",
          "and rule_code = #{ruleCode,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="risk_type", property="riskType", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="rule_code", property="ruleCode", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="rule_name", property="ruleName", jdbcType=JdbcType.VARCHAR),
        @Result(column="rule_value", property="ruleValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="rule_description", property="ruleDescription", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updatete_time", property="updateteTime", jdbcType=JdbcType.TIMESTAMP)
    })
    FintechRiskRule selectByPrimaryKey(FintechRiskRuleKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechRiskRuleSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FintechRiskRule record, @Param("example") FintechRiskRuleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechRiskRuleSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FintechRiskRule record, @Param("example") FintechRiskRuleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechRiskRuleSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FintechRiskRule record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_risk_rule
     *
     * @mbg.generated
     */
    @Update({
        "update fintech_risk_rule",
        "set rule_name = #{ruleName,jdbcType=VARCHAR},",
          "rule_value = #{ruleValue,jdbcType=VARCHAR},",
          "rule_description = #{ruleDescription,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "updatete_time = #{updateteTime,jdbcType=TIMESTAMP}",
        "where risk_type = #{riskType,jdbcType=VARCHAR}",
          "and rule_code = #{ruleCode,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(FintechRiskRule record);
}